<?php
class AppModel extends Model {

        function _isUnique($check, $field) {
                return $this->isUnique($field);
        }

        function checkCaptcha() {
                $code = strtoupper($this->data[$this->name]['captcha']);
                if(!empty($_SESSION[CAPTCHA_SESSION_ID]) && $code == $_SESSION[CAPTCHA_SESSION_ID]) {
			$_SESSION['captchatrue'] = 1;
                        return true;
                } else {
                        return false;
                }
        }

}
?>
